<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #div0{
            width: 380px;
            height: 400px;
            background-color: violet;
            display: flex;
            /*flex-direction: row-reverse;*/
            /*flex-direction: column;*/
            /*flex-direction: row;*/
            /*换行设置,默认不换行*/
            /*flex-wrap: wrap;*/
            flex-flow: row wrap;
            /* 剩余空间调整为间距 */
            justify-content: space-around;

            /* 设置每个flex元素在交叉轴上的默认对齐方式 */
            align-items: center;
            /*align-content: center;*/
        }
        #div0 div{
            width: 100px;
            height: 100px;
            background-color: yellow;
            /*margin-top: 10px;*/
        }
    </style>
</head>
<body>
    <div id="div0">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
    </div>
</body>
</html>
